import {
  redirectRoutes
} from "@/utils";
import {
  BASE_ROUTES,
  DYNAMIC_ROUTES
} from "@/router/routes";

export default {
  SET_MAIN_WIDTH(state, value) {
    state.MAIN_WIDTH = value;
  },
  SET_CLIENT_HEIGHT(state, value) {
    state.CLIENT_HEIGHT = value;
  },
  SET_IS_VISIBLE_NOTIFY(state, value) {
    state.IS_VISIBLE_NOTIFY = value;
  },
  SET_IS_VISIBLE_ASIDE(state, value) {
    state.IS_VISIBLE_ASIDE = value;
  },
  SET_DYNAMIC_ROUTES(state, router) {
    let dynamicRoutes = redirectRoutes(DYNAMIC_ROUTES);
    router.addRoutes(dynamicRoutes);
    state.ROUTES = BASE_ROUTES.concat(dynamicRoutes);
  }
};